#!/usr/bin/env python3

import argparse
import json
import os

from rich.pretty import pprint
import bentoctl_lambda as awslambda

parser = argparse.ArgumentParser()
parser.add_argument("deployment_name", help="Name of the deployment")
parser.add_argument(
    "config_json",
    help="Deployment spec file",
    default=os.path.join(os.getcwd(), "deployment_config.json"),
    nargs="?",
)
args = parser.parse_args()
with open(args.config_json, "r") as file:
    deployment_spec = json.loads(file.read())

info_json = awslambda.describe(args.deployment_name, deployment_spec)
pprint(info_json)
